home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 November: Tool Chest / Dev.CD Nov 98 TC.toast / Sample Code / Snippets / Development Tools & Languages / DTSCPlusLibrary / Sources / Environment.h < prev    next >
Encoding:
Text File  |  1993-01-14  |  2.0 KB  |  69 lines  |  [TEXT/MPS ]

  1. /* _________________________________________________________________________________________________________ //
  2.   Copyright © 1992 Apple Computer, Inc. All rights reserved.
  3.   Macintosh Developer Technical Support.C++ Macintosh Toolbox Framework.
  4.   Programmer: Kent Sandvik
  5.   Date: 11/9/92
  6.   Revision comments are at the end of this file.
  7.   ---
  8.   TEnvironment is a Gestalt wrapper class that finds out information about the environment.
  9.   Environment.h contains the header file information for the TEnvironment class.
  10.   _________________________________________________________________________________________________________ */
  11.  
  12. // Declare label for this header file
  13. #ifndef _ENVIRONMENT_
  14. #define _ENVIRONMENT_
  15.  
  16.  
  17. #ifndef _DTSCPLUSLIBRARY_
  18. #include "DTSCPlusLibrary.h"
  19. #endif
  20.  
  21. //    Toolbox Include Files
  22. #ifndef __GESTALTEQU__
  23. #include <GestaltEqu.h>
  24. #endif
  25.  
  26. #ifndef __OSUTILS__
  27. #include <OSUtils.h>
  28. #endif
  29.  
  30. #ifndef __TRAPS__
  31. #include <Traps.h>
  32. #endif
  33.  
  34.  
  35. // _________________________________________________________________________________________________________ //
  36. //    TEnvironment Class Interface
  37.  
  38. class TEnvironment
  39. {
  40. public:
  41.     //    CONSTRUCTORS AND DESTRUCTORS
  42.     TEnvironment();                                // constructor
  43.     ~TEnvironment();                            // destructor
  44.  
  45.     //    MAIN INTERFACE    
  46.     virtual Boolean HasAttribute(OSType attribute,
  47.                                  short theBit);    // check for any Gestalt attribute
  48.     virtual Boolean Check128k();                // check for MacOS version (128k Mac?)
  49.     virtual Boolean HasAppleEvents();            // check if AE support is available
  50.     virtual Boolean HasColorQD();                // check if Color QD is available
  51.     virtual Boolean IsSystemSeven();            // check if we run under System 7 or not
  52.     virtual Boolean TrapAvailable(short aNumber,
  53.                                   // check for traps
  54.                                   TrapType aType);
  55.     // FIELDS
  56. protected:
  57.     Boolean fResult;                            // our Gestalt result
  58.     long fLongResult;                            // used by Gestalt as well
  59. };
  60.  
  61. #endif
  62.  
  63. // _________________________________________________________________________________________________________ //
  64.  
  65. /*    Change History (most recent last):
  66.   No        Init.    Date        Comment
  67.   1            khs        11/9/92        New file
  68. */
  69.